import URLS from '../../config/urls'
import { get, post } from './ajax'
let base = URLS.API_URL;

// 用户相关
export const postLogin = p => post(`${base}/login`, p);
export const getLogin = p => get(`${base}/login`, p);
export const getUserList = p => get(`${base}/getuserlist`, p);
export const postRegister = p => post(`${base}/register`, p);
export const postDelete = p => post(`${base}/deluser`, p);
export const getUpdateUser = p => get(`${base}/upuser`, p);
export const postUpdateUser = p => post(`${base}/upuser`, p);
export const postAddRole = p => post(`${base}/addrole`, p);
export const postAddDepar = p => post(`${base}/adddepar`, p);
export const getAddDepar = p => get(`${base}/adddepar`, p);
export const getRole = p => get(`${base}/rolelist`, p);

// http://127.0.0.1:8000/test/
